﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true" CodeBehind="EditMagazine.aspx.cs" Inherits="Maticsoft.Web.Admin.Info.EditMagazine" %>
<%@ Register assembly="FredCK.FCKeditorV2" namespace="FredCK.FCKeditorV2" tagprefix="FCKeditorV2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<script type="text/javascript">
    function ChangeCategory() {
        if ($("#ctl00_ContentPlaceHolder1_ddlType").val() == "9") {
            $("#tr1").show();
            $("#tr2").show();
            $("#tr3").show();
            $("#tr3 td").eq(0).html('总编：');
            $("#tr4").show();
            $("#tr5").show();
            $("#tr6").show();
            $("#tr6 td").eq(0).html('邮发代号：');
            $("#tr8 td").eq(0).html('文章推荐：');
        }
        if ($("#ctl00_ContentPlaceHolder1_ddlType").val() == "12") {
            $("#tr1").hide();
            $("#tr2").show();
            $("#tr3").show();
            $("#tr3 td").eq(0).html('编辑：');
            $("#tr4").hide();
            $("#tr5").hide();
            $("#tr6").show();
            $("#tr6 td").eq(0).html('出版发行：');
            $("#tr8 td").eq(0).html('内容提要：');
        }
        if ($("#ctl00_ContentPlaceHolder1_ddlType").val() == "14") {
            $("#tr1").hide();
            $("#tr2").show();
            $("#tr3").show();
            $("#tr3 td").eq(0).html('编辑：');
            $("#tr4").hide();
            $("#tr5").hide();
            $("#tr6").show();
            $("#tr6 td").eq(0).html('出版发行：');
            $("#tr8 td").eq(0).html('内容提要：');
        }
    }
    function Chk() {
        var flag = true;
        $("#ctl00_ContentPlaceHolder1_ddlType_Span").html('');
        $("#ctl00_ContentPlaceHolder1_txtYear_Span").html('');
        $("#ctl00_ContentPlaceHolder1_txtPeriod_Span").html('');
        $("#ctl00_ContentPlaceHolder1_txtUnit1_Span").html('');
        $("#ctl00_ContentPlaceHolder1_txtUnit2_Span").html('');
        $("#ctl00_ContentPlaceHolder1_txtChief_Span").html('');
        $("#ctl00_ContentPlaceHolder1_txtISSN_Span").html('');
        $("#ctl00_ContentPlaceHolder1_txtCnISSN_Span").html('');
        $("#ctl00_ContentPlaceHolder1_txtMailCode_Span").html('');


        if ($("#ctl00_ContentPlaceHolder1_ddlType").val() == "") {
            $("#ctl00_ContentPlaceHolder1_ddlType_Span").html('*');
            flag = false;
        }
        if ($("#ctl00_ContentPlaceHolder1_txtYear").val() == "") {
            $("#ctl00_ContentPlaceHolder1_txtYear_Span").html('*');
            flag = false;
        }
        if ($("#ctl00_ContentPlaceHolder1_txtPeriod").val() == "") {
            $("#ctl00_ContentPlaceHolder1_txtPeriod_Span").html('*');
            flag = false;
        }

        if ($("#ctl00_ContentPlaceHolder1_ddlType").val() == "9") {
            if ($("#ctl00_ContentPlaceHolder1_txtUnit1").val() == "") {
                $("#ctl00_ContentPlaceHolder1_txtUnit1_Span").html('*');
                flag = false;
            }
            if($("#ctl00_ContentPlaceHolder1_txtUnit2").val()=="") {
                $("#ctl00_ContentPlaceHolder1_txtUnit2_Span").html('*');
                flag = false;
            }
            if ($("#ctl00_ContentPlaceHolder1_txtChief").val() == "") {
                $("#ctl00_ContentPlaceHolder1_txtChief_Span").html('*');
                flag = false;
            }
            if ($("#ctl00_ContentPlaceHolder1_txtISSN").val() == "") {
                $("#ctl00_ContentPlaceHolder1_txtISSN_Span").html('*');
                flag = false;
            }
            if ($("#ctl00_ContentPlaceHolder1_txtCnISSN").val() == "") {
                $("#ctl00_ContentPlaceHolder1_txtCnISSN_Span").html('*');
                flag = false;
            }
            if ($("#ctl00_ContentPlaceHolder1_txtMailCode").val() == "") {
                $("#ctl00_ContentPlaceHolder1_txtMailCode_Span").html('*');
                flag = false;
            }
        }
        if ($("#ctl00_ContentPlaceHolder1_ddlType").val() == "12") {
            if ($("#ctl00_ContentPlaceHolder1_txtUnit2").val() == "") {
                $("#ctl00_ContentPlaceHolder1_txtUnit2_Span").html('*');
                flag = false;
            }
            if ($("#ctl00_ContentPlaceHolder1_txtChief").val() == "") {
                $("#ctl00_ContentPlaceHolder1_txtChief_Span").html('*');
                flag = false;
            }
            if ($("#ctl00_ContentPlaceHolder1_txtMailCode").val() == "") {
                $("#ctl00_ContentPlaceHolder1_txtMailCode_Span").html('*');
                flag = false;
            }
        }
        if ($("#ctl00_ContentPlaceHolder1_ddlType").val() == "14") {
            if ($("#ctl00_ContentPlaceHolder1_txtUnit2").val() == "") {
                $("#ctl00_ContentPlaceHolder1_txtUnit2_Span").html('*');
                flag = false;
            }
            if ($("#ctl00_ContentPlaceHolder1_txtChief").val() == "") {
                $("#ctl00_ContentPlaceHolder1_txtChief_Span").html('*');
                flag = false;
            }
            if ($("#ctl00_ContentPlaceHolder1_txtMailCode").val() == "") {
                $("#ctl00_ContentPlaceHolder1_txtMailCode_Span").html('*');
                flag = false;
            }
        }

        return flag;
    }
</script>
    <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#111111"
        style="border-collapse: collapse">
        <tr>
            <td width="100%" height="20" valign="top">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td height="30">
                            <img height="14" src="../images/book1.gif" width="20">&nbsp;内容管理&nbsp;&gt;&gt;&nbsp;添加/修改期刊
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td width="100%" height="1" background="../images/sp_bg.gif">
            </td>
        </tr>
    </table>
    <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
            <td height="10">
            </td>
        </tr>
    </table>
    <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
            <td height="95" align="center" bgcolor="#FFFFFF">
                <table width="100%" border="0" id="needset" cellspacing="0" cellpadding="0" style="text-align: left;
                    border: 1px solid #cfcfcf; background: #ffffff;">
                    <tr>
                        <td width="150" class='bline' height="26" style="padding-left: 10px;">
                            类别：
                        </td>
                        <td class='bline'>
                            <asp:DropDownList ID="ddlType" runat="server" onchange="ChangeCategory();">
                            <asp:ListItem Value="">请选择</asp:ListItem>
                            <asp:ListItem Value="9">文章推荐（中国审计期刊）</asp:ListItem>
                            <asp:ListItem Value="14">《法规选编》期刊</asp:ListItem>
                            </asp:DropDownList>&nbsp;<span id="ctl00_ContentPlaceHolder1_ddlType_Span" style="color:Red"></span>
                        </td>
                    </tr>
                    <tr>
                        <td width="150" class='bline' height="26" style="padding-left: 10px;">
                            年份：
                        </td>
                        <td class='bline'>
                            <asp:TextBox ID="txtYear" runat="server" Width="200px"></asp:TextBox>&nbsp;<span id="ctl00_ContentPlaceHolder1_txtYear_Span" style="color:Red"></span>
                        </td>
                    </tr>
                    <tr>
                        <td width="150" class='bline' height="26" style="padding-left: 10px;">
                            期号：
                        </td>
                        <td class='bline'>
                            <asp:TextBox ID="txtPeriod" runat="server" Width="200px"></asp:TextBox>&nbsp;<span id="ctl00_ContentPlaceHolder1_txtPeriod_Span" style="color:Red"></span>
                        </td>
                    </tr>
                    <tr id="tr1" style="display:none">
                        <td width="150" class='bline' height="26" style="padding-left: 10px;">
                            主管单位：
                        </td>
                        <td class='bline'>
                            <asp:TextBox ID="txtUnit1" runat="server" Width="200px"></asp:TextBox>&nbsp;<span id="ctl00_ContentPlaceHolder1_txtUnit1_Span" style="color:Red"></span>
                        </td>
                    </tr>
                    <tr id="tr2" style="display:none">
                        <td width="150" class='bline' height="26" style="padding-left: 10px;">
                            主办单位：
                        </td>
                        <td class='bline'>
                            <asp:TextBox ID="txtUnit2" runat="server" Width="200px"></asp:TextBox>&nbsp;<span id="ctl00_ContentPlaceHolder1_txtUnit2_Span" style="color:Red"></span>
                        </td>
                    </tr>
                    <tr id="tr3" style="display:none">
                        <td width="150" class='bline' height="26" style="padding-left: 10px;">
                            总编：
                        </td>
                        <td class='bline'>
                            <asp:TextBox ID="txtChief" runat="server" Width="200px"></asp:TextBox>&nbsp;<span id="ctl00_ContentPlaceHolder1_txtChief_Span" style="color:Red"></span>
                        </td>
                    </tr>
                    <tr id="tr4" style="display:none">
                        <td width="150" class='bline' height="26" style="padding-left: 10px;">
                            国际标准刊号：
                        </td>
                        <td class='bline'>
                            <asp:TextBox ID="txtISSN" runat="server" Width="200px"></asp:TextBox>&nbsp;<span id="ctl00_ContentPlaceHolder1_txtISSN_Span" style="color:Red"></span>
                        </td>
                    </tr>
                    <tr id="tr5" style="display:none">
                        <td width="150" class='bline' height="26" style="padding-left: 10px;">
                            国内统一刊号：
                        </td>
                        <td class='bline'>
                            <asp:TextBox ID="txtCnISSN" runat="server" Width="200px"></asp:TextBox>&nbsp;<span id="ctl00_ContentPlaceHolder1_txtCnISSN_Span" style="color:Red"></span>
                        </td>
                    </tr>
                    <tr id="tr6" style="display:none">
                        <td width="150" class='bline' height="26" style="padding-left: 10px;">
                            邮发代号：
                        </td>
                        <td class='bline'>
                            <asp:TextBox ID="txtMailCode" runat="server" Width="200px"></asp:TextBox>&nbsp;<span id="ctl00_ContentPlaceHolder1_txtMailCode_Span" style="color:Red"></span>
                        </td>
                    </tr>
                    <tr style="display:none">
                        <td width="150" class='bline' height="26" style="padding-left: 10px;">
                            卷首语：
                        </td>
                        <td class='bline'>
                            <FCKeditorV2:FCKeditor ID="FCKeditor1" ToolbarSet="Basic" runat="server">
                            </FCKeditorV2:FCKeditor>
                        </td>
                    </tr>
                    <tr id="tr7">
                        <td width="150" class='bline' height="26" style="padding-left: 10px;">
                            目录：
                        </td>
                        <td class='bline'>
                            <FCKeditorV2:FCKeditor ID="FCKeditor2" ToolbarSet="Basic" runat="server">
                            </FCKeditorV2:FCKeditor>
                        </td>
                    </tr>
                    <tr id="tr8">
                        <td width="150" class='bline' height="26" style="padding-left: 10px;">
                            内容提要：
                        </td>
                        <td class='bline'>
                            <FCKeditorV2:FCKeditor ID="FCKeditor3" ToolbarSet="Basic" runat="server">
                            </FCKeditorV2:FCKeditor>
                        </td>
                    </tr>
                    
                    <tr>
                        <td class='bline' height="26" style="padding-left: 10px;">
                            上传图片：
                        </td>
                        <td class='bline'>
                            <input id="File1" type="file" runat="server" style="height:25px; width:210px;" /></td>
                    </tr>
                    <tr>
                        <td class='bline' height="26" style="padding-left: 10px;">
                            图片：
                        </td>
                        <td class='bline'>
                            <asp:Image ID="Image1" runat="server" ImageUrl="~/admin/images/booknopic.gif" Width="60px" Height="80px" />
                        </td>
                    </tr>
                    <tr>
                        <td class='bline' height="26" style="padding-left: 10px;">
                            &nbsp;
                        </td>
                        <td class='bline'>
                            <input id="cbTop" type="checkbox" value="1" class="np" runat="server" />网站首页
                        </td>
                    </tr>
                </table>
                <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#F9FCEF"
                    style="border: 1px solid #cfcfcf; border-top: none;">
                    <tr>
                        <td width="1%" height="35">
                        </td>
                        <td width="99%" valign="bottom">
                            <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="../images/button_ok.gif"
                                class="np" onclick="ImageButton1_Click" OnClientClick="return Chk();" />
                            &nbsp;&nbsp;<a href="Magazine.aspx"><img src="../images/button_back.gif" width="60" height="22" border="0" /></a>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    <script type="text/javascript">
        ChangeCategory();
    </script>
</asp:Content>
